package com.ua.secure.user.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ua.common.model.SysUser;
import com.ua.secure.user.persistence.UserMapper;


@Service
public class UserServiceImpl implements UserService {
	
	@Autowired
	private UserMapper mapper;
	
	@Override
	public List<SysUser> queryAllUsers(SysUser user) {
		return mapper.queryAllUsers(user);
	}

	@Override
	public Integer userCount(SysUser user) {
		return mapper.userCount(user);
	}

	@Override
	public void saveUser(SysUser user) {
		mapper.saveUser(user);
	}

	@Override
	public void updateUser(SysUser user) {
		mapper.updateUser(user);
		
	}

	@Override
	public SysUser queryUserByUserId(String userId) {
		// TODO Auto-generated method stub
		return mapper.queryUserByUserId(userId);
	}

	@Override
	public void delUser(String userId) {
		mapper.delUser(userId);
		
	}

	@Override
	public void resetPassword(SysUser user) {
		mapper.resetPassword(user);
		
	}

	@Override
	public void updatePw(SysUser user) {
		mapper.updatePw(user);
	}	
	
}
